<?php
function getComments($postId, $myViewClass)
{
	$postId = intval($postId);
	$myViewClass -> page_calculate("comments", "WHERE `post_id` = '". $postId ."' AND `stat` = 1 ORDER BY `id` DESC");
	$query2 = $myViewClass -> page_list();
	
	while ($data2 = mysql_fetch_array($query2)) {
		++$i;
		if ($i % 2) 
			echo '<div class="binar1"><b>';
		else
			echo '<div class="binar2"><b>';
		echo $data2['comment'] .'</b><br />';
		echo '<h4>Автор: '. $data2['author'] ;
		echo GEOIP == 1 ? ', Из: '. $data2['local'] : "" ;
		echo ' ('. $data2['date'] .')';
		echo '</h4>';
		echo '</div>';
	}
}
?>